all: testlz.bin testlz.cas

%.lz: %
	dosbox -c 'mount c .' -c 'c:' -c 'comtoexe $< tmp.exe' -c 'lzexe tmp.exe' -c 'del tmp.old' -c 'exit'
	python extract_compressed.py TMP.EXE $@
	rm TMP.EXE

testlz.raw: testlz.asm z80unlze.asm lorem_ip.txt.lz
	pasmo $< $@

testlz.bin: testlz.raw
	python raw2bin.py $< $@ 0xA000

testlz.cas: testlz.raw
	python raw2cas.py $< $@ TestLZ 0xA000

.PHONY: all
